{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}

{{> header background=@site.cover_image}} {{!--Special header.hbs partial to generate the <header> tag--}}
    <div class="inner">
        <div class="site-header-content">
            <h1 class="site-title">
                {{#if @site.logo}}
                    <img class="site-logo" src="{{img_url @site.logo size="l"}}" alt="{{@site.title}}" />
                {{else}}
                    {{@site.title}}
                {{/if}}
            </h1>
            <h2 class="site-description">{{@site.description}}</h2>
        </div>
    </div>
</header>

{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
    <div class="inner">
        <div class="tags-box">
            <h2 class="tags-title">文章标签</h2>
            <ul class="tags-list">
            </ul>
        </div>

    </div>
</main>
<script>
    window.onload= function(){
        $.ajax({url:'/ghost/api/v2/content/tags/?key='+_ApiKey+'&include=count.posts',success:function(re){
            console.log(re);
            re.tags.forEach(function(item){
                $('.tags-list').append($('<li class="tags-item"><a href="' + item.url + '"' + 'title="' + item.name + '">' + item.name + '<span>'+item.count.posts+'</span></a></li>'));
            })
        }},)
    }
</script>